import request from "@/utils/request";

/**
 * 获取组织列表
 */
export function httpOrgListOrg() {
  return request({
    url: "/org/listOrg",
    method: "get",
  });
}

/**
 * 新增组织列表
 */
export function httpOrgAddOrg(data) {
  return request({
    url: "/org/addOrg",
    method: "post",
    data,
  });
}

/**
 * 修改组织列表
 */
export function httpOrgUpdateOrg(data) {
  return request({
    url: "/org/updateOrg",
    method: "post",
    data,
  });
}

/**
 * 删除单个组织
 */
export function httpOrgDeleteOrg(data) {
  return request({
    url: "/org/deleteOrg",
    method: "post",
    data,
  });
}

/**
 * 渠道已绑定产品列表
 */
export function httpListOrgProduct(organizationId) {
  return request({
    url: `/orgProduct/listOrgProduct/${organizationId}`,
    method: "get",
  });
}
